package com.jiangjiang.eshop.commodity.convert;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jiangjiang.eshop.commodity.domain.GoodsEntity;
import com.jiangjiang.eshop.commodity.dto.GoodsDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * @ClassName GoodsConvert
 * @Description TODO
 * @Author jhw
 * @Date 2021/8/2 16:35
 * @Version 1.0
 **/
@Mapper(componentModel = "spring")
public interface GoodsConvert {
    Page<GoodsDTO> convertPage2DTO(Page<GoodsEntity> entityPage);

    GoodsDTO convertEntity2DTO(GoodsEntity entity);

    GoodsEntity convertDTO2Entity(GoodsDTO dto);
}
